package com.stud.common.constant;

import com.stud.common.core.domain.CycleParams;

import java.time.LocalTime;
import java.time.format.DateTimeFormatter;

/**
 * @author Stud
 * @date 2023-12-07 11:20
 */
public class CycleConstants {

    public static final CycleParams DEFAULT_CYCLE_PARAMS = new CycleParams();

    public static final LocalTime LOCAL_TIME_MIN = LocalTime.MIN;

    /**
     * 最大时间,nanoOfSecond超过6个9后,会导致查询出第二天的数据.
     */
    public static final LocalTime LOCAL_TIME_MAX = LocalTime.MAX.plusNanos(-999);

    public static final DateTimeFormatter PATTERN_YEAR = DateTimeFormatter.ofPattern("yyyy");
    public static final DateTimeFormatter PATTERN_MONTH = DateTimeFormatter.ofPattern("yyyy-MM");
    public static final DateTimeFormatter PATTERN_DAY = DateTimeFormatter.ofPattern("yyyy-MM-dd");
    public static final DateTimeFormatter PATTERN_HOUR = DateTimeFormatter.ofPattern("yyyy-MM-dd HH");
    public static final DateTimeFormatter PATTERN_MINUTE = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm");
}
